package com.test.service;

import com.test.dao.UserDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2018/12/1 9:46
 */
@Slf4j
@Service
public class UserService {

    @Autowired
    private UserDao userDao;

    @Transactional
    public void insertUser() {
        userDao.instert();
        log.info("插入完成...");
        int a = 10 / 0;
    }
}
